﻿
function initPage() {
	
	 
	$('div.c_right').tabs({
		containerClass: "c_r_body",
		selectedClass: "on",
		hash: true
	});
 
	
 
		//修改信息提交动作
	$('#form_edit').submit(function(){
		var form = $(this);
		var msg = $("#result");
		var data = form.serializeArray();
		msg.warning(TXT_POSTDATA);
		form.disabled();
		$.ajax({
			type: "POST",
			url: form.attr("action")+"?act=edit",
			data: data,
			dataType: "json",
			success: function(ret){
				msg.warning(ret.msg);		
 
				if (ret.success) {
					
					var d = ret.url ? ret.url : "/";
					setTimeout( function() {									
						window.location = d;
					}, 800)
				} else {
					form.enabled();
				}				
			},
			error: function(res){
				//alert("error");
				msg.warning(TXT_NETBUSY);
				form.enabled();
			}
		});
		return false;
	});
	
	
}
 

 